package com.san.hkhospital.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.san.hkhospital.entity.PayoutExample;
import java.util.List;
import java.util.Map;

import com.san.hkhospital.entity.Payout;
import com.san.hkhospital.mapper.PayoutMapper;
import com.san.hkhospital.service.PayoutService;
import org.springframework.transaction.annotation.Transactional;

/**
 * ClassName:PayoutServiceImpl
 * PackageName:com.san.hkhospital.service.impl
 * Description:
 *
 * @Author:yy
 * @CreatedAt:2024/11/13 14:38
 * 
 */
 
 @Transactional
@Service
public class PayoutServiceImpl implements PayoutService{

    @Resource
    private PayoutMapper payoutMapper;

    @Override
    public long countByExample(PayoutExample example) {
        return payoutMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(PayoutExample example) {
        return payoutMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer outId) {
        return payoutMapper.deleteByPrimaryKey(outId);
    }

    @Override
    public int insert(Payout record) {
        return payoutMapper.insert(record);
    }

    @Override
    public int insertSelective(Payout record) {
        return payoutMapper.insertSelective(record);
    }

    @Override
    public List<Payout> selectByExample(PayoutExample example) {
        return payoutMapper.selectByExample(example);
    }

    @Override
    public Payout selectByPrimaryKey(Integer outId) {
        return payoutMapper.selectByPrimaryKey(outId);
    }

    @Override
    public int updateByExampleSelective(Payout record,PayoutExample example) {
        return payoutMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Payout record,PayoutExample example) {
        return payoutMapper.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Payout record) {
        return payoutMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Payout record) {
        return payoutMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Payout> payOutList() {
        return payoutMapper.selectByExample(null);
    }

    @Override
    public List<Payout> searchList(Map<String, String> params) {
        return payoutMapper.searchPayOut(params);
    }

    @Override
    public boolean addPayOut(Payout payout) {
        return payoutMapper.insertSelective(payout)>0?true:false;
    }

    @Override
    public int updatePayOut(Payout payout) {
        return payoutMapper.updateByPrimaryKey(payout);
    }

}
